<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Contato_model extends CI_Model {

    function __construct() {
        parent::__construct();
        $this->load->config('parametros');
    }

    /**
     * Get user record by Id
     *
     * @param	int
     * @param	bool
     * @return	object
     */
    public function get($_nome) {
        $this->db->where('id', trim($_nome));
        $query = $this->db->get($this->config->item('dbCliente') . $this->config->item('tblConfig'));
        if ($query->num_rows() > 0) {
            return $query->row();
        } else {
            return NULL;
        }
    }
}